import { Column, Entity, Index } from 'typeorm';
import { IBaseEntity } from '../../00_base/IBaseEntity';

@Index('name', ['name'], { unique: true })
@Index('PK__sys_role__3213E83F66FAD2CB', ['id'], { unique: true })
@Entity('sys_role', { schema: 'dbo' })
export class SysRole extends IBaseEntity {
  @Column('nvarchar', { name: 'name', length: 64 })
  name: string;

  @Column('nvarchar', { name: 'code', nullable: true, length: 32 })
  code: string | null;

  @Column('int', { name: 'sort', nullable: true })
  sort: number | null;

  @Column('tinyint', { name: 'status', nullable: true })
  status: number | null;

  @Column('tinyint', { name: 'data_scope', nullable: true })
  dataScope: number | null;
}
